The number of businesses exchanging information electronically is proliferating. Businesses that exchange information have recognized the need for a common standard for representing data. Extensible Markup Language (“XML”) is rapidly becoming the common standard for representing data.
XML describes and provides structure to a body of data, such as a file or data packet, referred to herein as an XML document. XML standards provide for tags that delimit sections of an XML document referred to as XML elements or elements.
An element may contain various types of data, including element attributes and other elements. An element that is contained by another element is referred to as a descendant of that element. By defining an element that contains attributes and descendant elements, the XML document defines parent-child hierarchical relationships between the element, its descendant elements, and its attributes.
The term node is used to refer to individual elements and element attributes in an XML document. Thus, an XML document defines a hierarchy of nodes having parent-child relationships. Such a hierarchy is referred to herein as a node tree or a node hierarchy.
The term attribute is used herein to refer to a discrete part or element of a structure, such as a data structure or an object that belongs to an object type according to the object-oriented methodology. An attribute may be a complex construct containing one or more other attributes, referred to herein as a member of the attribute. XML standards provide for element attributes in the form of name-value pairs. While the meaning of the term attribute, as used herein, encompasses element attributes, the term is not so limited.
Industry standards define structures for representing XML documents. One such standard is the Document Object Model (DOM), promulgated by the World Wide Web Consortium (W3C).
In order for a computer to operate on an XML document, an in-memory representation of the XML document is generated. In general, an XML document is loaded from a storage device (e.g., a disk that stores files that contain XML entities) to generate in-memory data structures used to represent an XML document. The in-memory data structures are manipulated by computer processes executing software and programs. The process of loading an XML document into memory and generating an in memory representation of the XML document is referred to as manifestation or manifesting an XML document. Typically, applications access and manipulate the in-memory data structures created by manifestation through an API.
Under conventional approaches for manifestation, when an XML document is manifested, the entire XML document is manifested. XML documents can be very large, and thus require a significant amount of memory when manifesting them. Some XML documents are so large that memory needed to manifest them far surpasses the memory capacity of many computers.
Based on the foregoing, it is desirable to provide a mechanism that reduces that amount of memory needed to manifest an XML document.